home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
pcw302_3.arc
/
WORKDISK.BAT
< prev
next >
Wrap
DOS Batch File
|
1991-02-21
|
6KB
|
199 lines
echo off
echo .
echo Now Making a PC-Write Work Disk
echo This will NOT affect CONFIG.SYS or AUTOEXEC.BAT files.
echo .
set v=123456789012345678901234567890
if %v%==123456789012345678901234567890 goto a
echo Not enough "environment" memory.
goto z
:a
set v=
getyn √ \%1
if not errorlevel 1 goto c
echo The "%1" after WORKDISK must end in ":", or "\" for a directory, as in:
echo WORKDISK C:\PCW\
goto z
:c
set t=%1
set b=2
set w=1
getyn Do you have 5.25 inch floppy disks? (Y if so, N if 3.5 inch)
if not errorlevel 1 goto e
set b=3
set w=2
:e
getyn Do you want to make backup copies of the PC-Write diskettes?
if errorlevel 1 goto f
set b=0
:f
if %b%==0 goto g
getyn Do you have %b% blank, formatted diskettes ready, for backups?
if not errorlevel 1 goto z
set d=%2
if %2x==x set d=B:
getyn Backups will be made on the %d% drive, ok?
if errorlevel 1 goto g
echo Enter a command like "WORKDISK C:\PCW\ A:" or "WORKDISK A: A:" where the first
echo name is where to make your work disk, and the second is the drive for backups.
goto z
:g
getyn Are you installing on a hard disk? (Y if so, N if on floppy)
echo .
if errorlevel 1 goto h
getyn Do you have %w% blank, formatted diskettes to make work disks?
if not errorlevel 1 goto z
if %1x==x set t=B:
getyn Work diskettes will be made on the %t% drive, ok?
if errorlevel 1 goto i
echo Enter a command like WORKDISK A: to select the drive you want.
goto z
:h
set w=0
if not %1x==x goto j
getyn Your work directory will be C:\PCW\, ok? Press Y if unsure.
if errorlevel 1 goto k
echo Enter a command like WORKDISK C:\PCW\ to select the directory you want.
goto z
:k
echo If C:\PCW\ already exists, ignore "unable to create directory" message.
echo on
mkdir C:\PCW
echo off
set t=c:\pcw\
:j
getyn Your work directory will be %t%, ok?
:i
echo .
:q
if exist ed.exe goto r
getyn Insert PC-Write Program diskette in default drive, press Y.
if not errorlevel 1 goto z
goto q
:r
getyn Do you want to put your registration number on the front screen?
if not errorlevel 1 goto s
echo This takes a minute...
ed =
if errorlevel 1 goto r
:s
getyn Do you want to put your own special message on the front screen?
if not errorlevel 1 goto t
echo This takes a minute...
ed +
if errorlevel 1 goto s
:t
if %b%==0 goto u
getyn Insert blank disk for Program Disk backup in drive %d%, press Y.
if not errorlevel 1 goto u
echo on
copy *.* %d%
echo off
:u
if %w%==0 goto v
getyn Insert blank disk to become the Work Disk in drive %t%, press Y.
if not errorlevel 1 goto z
:v
copy getyn.com %t%()
getyn ε %t%()
if errorlevel 1 goto l
echo Cannot copy files to %t%; have to cancel WORKDISK process.
echo Check that %t% has enough room and is not write-protected.
echo If %t% is a directory, make sure it ends with a final "\".
echo If %t% does not exist, use the MKDIR %t% command WITHOUT
echo the final "\" to create it; for example: MKDIR C:\PCW
goto z
:l
if not exist () goto n
if %w%==0 goto o
echo The default drive, %t%, is also where you want to make
echo work disks. Run WORKDISK again, giving another drive.
goto p
:o
echo The default directory, %t%, is also where you want your
echo work directory. Create a different work directory,
echo and run WORKDISK again giving this other directory.
:p
del %t%()
goto z
:n
del %t%()
echo .
getyn Do you want to copy the main PC-Write program? Press Y if unsure.
if errorlevel 1 copy ed.exe %t%ed.exe
echo .
getyn ε %t%pr.exe
if not errorlevel 1 goto w
getyn Your file PR.EXE is obsolete; delete it now? Press Y if unsure.
if errorlevel 1 del %t%pr.exe
:w
echo Older PC-Write versions used the PR command to print from DOS.
echo Now the ED command with /P switch is used to print from DOS.
echo You can have a PR.BAT file to still print with a PR command.
getyn Do you want this PR command to print from DOS? Press N if unsure.
if not errorlevel 1 goto x
echo ED %%1 %%2 %%3 %%4 %%5 %%6 /P > %t%pr.bat
:x
echo .
set h=0
echo Main Help file has 45 help screens but takes 75K of disk space.
echo There are smaller beginner and advanced Help files available.
getyn Do you want this main PC-Write Help file? Press Y if unsure.
if not errorlevel 1 goto b
copy ed.hlp %t%ed.hlp
set h=1
:b
if errorlevel 1 copy ed.hlp %t%ed.hlp
echo .
getyn Do you want to make an Edit Control File? Press Y if unsure.
if not errorlevel 1 goto y
copy ed.def %t%ed.def
getyn Are you using a Tandy 1000/3000 keyboard? Press N if unsure.
if not errorlevel 1 goto d
copy ed.trs %t%ed.def
echo These Tandy keyboards are not standard, so you will need to substitute some
goto kb
:d
getyn Is your keyboard sometimes "incompatible"? Press N if unsure.
if not errorlevel 1 goto kc
copy ed.spc %t%ed.def
echo The edit control file ED.SPC may help. You will need to substitute some keys,
:kb
echo such as Ctl-V for Scroll Lock. Look at the file ED.DEF for a complete list.
:kc
getyn Do you want to edit on a color monitor ? Press N if unsure.
if errorlevel 1 echo %%C >> %t%ed.def
getyn Do you want the three reminder lines on? Press Y if unsure.
if errorlevel 1 echo %%M >> %t%ed.def
getyn Do you want automatic save every 5 min.? Press Y if unsure.
if errorlevel 1 echo %%R] &R:5 >> %t%ed.def
set m=n
getyn Press Y to get one inch margins by default; N for no margins.
if not errorlevel 1 goto y
set m=y
echo L---+---T1----+-T--2----T----3--T-+----4T---+---T5----+-T--6----R----7--T-+-- >> %t%ed.def
echo .X:10 >> %t%ed.def
echo .XT:6 >> %t%ed.def
echo .XB:6 >> %t%ed.def
:y
if exist menuprt1.exe goto m
getyn Do you have a copy of the PC-Write Utility diskette?
if errorlevel 1 goto cu
echo Without the utility diskette, you can't use printer
echo enhancements like bold and underline, or use a mouse.
echo However, you can do normal editing and basic printing.
goto z
:cu
getyn Insert PC-Write Utility diskette in default drive, press Y.
if not errorlevel 1 goto z
:m
echo.
WORKUTIL
:z
set t=
set b=
set h=
set d=
set m=
set w=